flowchart TB
    A((User Task)) --> B["TaskAgent.main(task)"]
    B --> C["stepPre(task): set context"]
    C --> D["stepMain() calls LLMService.funcCallLLM"]
    D --> E{LLM returns tool calls?}
    E -- None --> F([End agent process])
    E -- Some --> G[For each tool call]
    G --> H["operation.router(toolArgs)"]
    H --> I{Which tool?}
    I -- ForwardModel --> J["Forward()"]
    I -- TurnModel --> K["Turn()"]
    I -- CaptureModel --> L["Capture()"]
    I -- SpeakModel --> M["Speak()"]
    I -- SetScheduleModel --> N["SetSchedule()"]
    I -- FindWalkModel --> O["FindWalk()"]
    I -- ArmMoveModel --> Q["ArmMove()"]
    Q --> R[Return tool result]
    O --> R
    N --> R
    M --> R
    L --> R
    K --> R
    J --> R
    R --> G((Repeat if more tool calls))
    G --> D[Re-check if more calls]
    D --> F([End])
